/**
 * @description Model Manifest
 *
 * @author Xiongmao
 */

var db = require('../db');

const ApplyItem = db.model('ApplyItem', {
    tableName: 'applys-items',
    hasTimestamps: true,
    parent() {
        return this.belongsTo('Type', 'parent_id');
    },

    grandpa() {
        return this.belongsTo('Type', 'grand_id');
    },
    customer() {
        return this.belongsTo('Customer', 'customer_id');
    }
});

module.exports = ApplyItem;
